import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-11
 * Time: 8:24
 */
//static变量和方法
class Dog{
    private String name;
    private int age;


    public Dog(){
        this("123",123);
    }
    public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
class Test {
static int a = 1;
public static void func(){
    System.out.println(a);
}
    public  int aMethod(){
        //static int a = 0;
        a++;
        return a;
    }
    public static void main2(String[] args) {
        Test test = new Test();
        //test.aMethod();
        //int j = test.aMethod();
        //System.out.println(j);
    }
    public static void main(String[] args) {
        Dog dog = new Dog();
        
        dog.setName("123");
        System.out.println(dog.getName());


    }

}
